var util = require('../../utils/util.js');
var qcloud = require('../../vendor/wafer2-client-sdk/index')
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    winWidth: 0,
    winHeight: 0,
    currentTab: 0, // tab切换 
    isHiddenMes: true,
    otherRecommInfo: {},//已推荐
    selfRecommInfo: {},//已应聘
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    util.post(app.api.myrecommend, { openid: app.globalData.openid, unionid: app.globalData.unionid }, function (res) {
      that.setData({
        selfRecommInfo: res.data.selfrecomm,
        otherRecommInfo: res.data.otherrecomm,
      });
    });
  },
 

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
   
  },

  //滑动切换tab
  bindChangeTab: function (e) {
    
    this.setData({ currentTab: e.detail.current });

  },
  
  //点击tab切换
  swichNav: function (e) {
    var that = this ;
    if (this.data.currentTab === e.target.dataset.current) {
      return false;
    } else {
      this.setData({
        currentTab: e.target.dataset.current
      })
    }
  },
  bulidResumeTap: function () {
    wx.navigateTo({
      url: '/pages/my-resume/my-resume',
    })
  } 

})